<template>
  <div class="rowBox">
    <el-row :gutter="12">
      <el-col :span="24">
        <div class="rowBox-item">
          <div class="rowBox-head">
            <h3>中文</h3>
            <el-link @click="changeLocale" style="margin-left: auto;">切换语音</el-link>
          </div>
          <div class="rowBox-main">
            <ObjectBox :data="zh">
              <template #item="{ row }">
                <CopyBox :data='`$t("${row.title}")`'>
                  {{ `${row.title}：${$t(row.title)}` }}
                </CopyBox>
              </template>
            </ObjectBox>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script setup lang="ts">
import './pageCss.scss'; // 引入样式
import { useListComponent } from './pageTs'; // 引入逻辑
import zh from '@/language/zh.ts';
const { dataInfo } = useListComponent();
import { onMounted, onBeforeUnmount, getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance() as any;

const changeLocale = () => {
  proxy.$i18n.locale = proxy.$i18n.locale === 'en' ? 'zh' : 'en';
}
onMounted(() => {
});

onBeforeUnmount(() => { });
</script>
